The changes to make update profile work

The changes to make the update work