Fixed bug. Now using AsyncTask for doing network access.