change the type of ref_count from guint to gint, so we can remove some