bug fixed in factory getInstance, class name is converted to lowercase