Fix for white flashes when loading avatars, performance improvements.