Fixing wrong class generation