added fixed avatar functionality