bug #5576: fixing poor GIF image quality (cherry picked from commit a55dad1)
typo, var name (cherry picked from commit 1d952b9)