Fixed bug with avatar image not working