slight code cleanup of avatar

whilst investigating a support question.