fixing some issues with generated classes