fixed problem with scanline count