Yet more sed bugfixes