dont check pid twice