Various small bugfixes to make it work with eba