fixed bug for similar to class generation