Fixed bugs in editing profile