More bugfixing in adapter.js, now it should work.