Fix some issues with productionmonitor script.  Added todo to fix later.