Fixing g_timeout_add calls