No broken avatars

Remake of #2357. Fixes #2208.