Some fixes

Some fixes for errors occurring during editing user profile, password reset & some other minor fixes.