fix chance-k-n exit code