glib: small improvements