bug fix, add os detection for sed