fix 'double stop' bug