Find correct pid