Fixed bug in upload avatar