fixing up detecting process id