Fix bug where last two points are ignored and the stroke is cut short.