avatar fix
refactor