fixing a sed bug