move all references to rec.plc_node_stats into the condition that checks it.