Added a try-catch for a known exception-causing bug. This, as far as I know, cannot be resolved in the code. The bug is caused by using a multimonitor display.