optimize code on user avatar uploding fix #486