fixed bug from updating generate_