replace quit with more accurate kill