References to class loader are now properly managed, fixes #12