fixed pid check