fixed double generator issue