fix some functions with update