fix a very nastly nearest stop bug