Fix bug. Did not initialize response code. Called connection.getResponseCode()