added missing beginPath call