gif decoder cleanup