fixed bug on avatar uploading
fixed bug caused by commit #e12689b88bd5d3239c35c