fix stop func