Fixed crash on monitor disconnection.