make sed more robust