Fixed error when startPoint and stopPoint were the same