Fixed a few more bugs in the local monitor script.