fix stop handling for signals