bugfix & code improve for ppu scanline rendering.