fixed gif reading