Change position to call g_main_loop_unref function.