Add missing pid in state scripts