Moved sublime.active_window() call out of thread for issue #2