Fixed check for generated class name