improved BeanLoader.getCurrent method and avoided null pointer
exceptions for class loading