sublime api not in main thread bug correction