fix bug in makeMonitor