Fix bug with definitions of start and end of tracks