Reverted avatar code, which wasn't working