fixed the double stop bug