Fixed issue with network and main thread.