Fix adapter threading issue