Merge pull request #3968 from BrzVlad/fix-monitor-exception