fixes thumbnail preview for avatar upload