fixes for NetworkInMainThread error using AsyncTask