Fixed issue with ClassFactory.