 
         for screen in NSScreen.screens() ?? [] {
             let screenIdentifier = screen.screenIdentifier()
-            var screenManager: ScreenManager? = screenManagersCache.objectForKey(screenIdentifier) as? ScreenManager
+            var screenManager = screenManagersCache[screenIdentifier]
 
             if screenManager == nil {
-                screenManager = ScreenManager(screen:screen, screenIdentifier:screenIdentifier, delegate:self)
-                screenManagersCache.setObject(screenManager!, forKey:screenIdentifier)
+                screenManager = ScreenManager(screen: screen, screenIdentifier: screenIdentifier, delegate: self)
+                screenManagersCache[screenIdentifier] = screenManager
             }
 
             screenManager!.screen = screen

    internal let windowModifier = WindowModifier()

    internal var screenManagers: [ScreenManager] = []
    private let screenManagersCache: NSCache = NSCache()

    private let focusFollowsMouseManager = FocusFollowsMouseManager()



        if NSScreen.screensHaveSeparateSpaces() {
            for screenDictionary in screenDictionaries {
                guard let screenIdentifier = screenDictionary["Display Identifier"] as? String else {
                    LogManager.log?.error("Could not identify screen with info: \(screenDictionary)")
                    continue
                }

                guard let screenManager = screenManagersCache[screenIdentifier] else {
                    LogManager.log?.error("Screen with identifier not managed: \(screenIdentifier)")
                    continue
                }

                guard let spaceIdentifier = spaceIdentifierWithScreenDictionary(screenDictionary) where screenManager.currentSpaceIdentifier != spaceIdentifier else {
                    continue
