fix bug in avatar_uploader