Solved bug in monitors
Minor code changes