Trying to fix the problem with the monitor logic.