added g_thread_init()