This fixes an issue with animated GIFs not being created properly