fix bug in edit_profile and registeration