Fix error in adapter.js