fixed user's edit functionality