Fix wrong path checks in monitor (bug 1013865)