Fix the PID var in kwapi init scritp