Fix for the class not found exception when hierarchy of class loader is used