fix dom gif reading
fix test cases for gif