Small bugfixes/Compatibility with glib 2.36.0 restored