fixed if PID was not set this results in an error

line 92: [: 10363: unary operator expected