fix a small bug of scanline.