add error checking to draw_finish