Fixed change username issue

Changing a username caused a new username to be written behind the old
username; fixed it so that the username changes completely