fixing GIF writes