(#1507) Fix changes in adapter.js