Fixed a few bugs on user edit