some fixes according to cgetpixel()