Fix miscounting stop positions