Fix check of process id