I don't think you actually need pen.closePath().