text relocations and fixes