Fixed error when data shows a spike starting at the end of the data