fix read old pid nil to integer error