Fixed bugs in user add and user edit.