fixed js error (fixes #244)
fixed path to pid