Fix up runPFSM() function.