call beginPath before rect
grunt