fix assertion in draw_pixel