Fix the last segment of a brush event not being drawn