Fixed avatar undefined error.