Fix problem of updating profile and add avatar