Fix error with if check on Configurator, fix error in invokeFactory method, needs to check for string