Fix to possibly limit blocking the main thread