small sed improvements