fix bugs in monitor commands