fix avatar saving and user profile