fixed sed syntax errors