fix bugs for useredit and registration