Animated gif bug fix