Fix exception in editprofile