fix the bug of drawing rectangle