Fix monitor JS (Closes #418)