fixed issues with gtk.pending_events