fixed issue with switching avatars