fix stop handling