BUG: Minor fix to draw_rectangle function