fixed issue when generating classes