fixing some important bugs related to profile edit and views