Fix so we kill when pid is set.

Previously we would only kill when pid was unset and so it didn't work