Fixed NetworkOnMainThreadException that would occur on newer Android devices.