Fix Glib-CRITICAL **: Source ID was not found when attempting to remove it