prevent glib assertion failure by making sure a GObjectClass is passed
clean up