fixed bug in HardGen