Fix bug in putpixel()