Changed the way update adapter.