fix avatar crash