fix to editing profile: "TypeError: Cannot call method 'toString' of undefined"