Made unit switching / toggling more robust, fix bug about characters not being active when pressing hotkeys