Fixes issue with making requests off main thread