fix stop() logic