relocations and several bugfixes