GTK3: fix a race condition error.