This fixes a bug with animated GIFs. Hopefully.