better pid check