fix adapter.js