Fixed NetworkOnMainThreadException on later versions of Android