fix gif animation bug