fixed bug on update_table