Fixing after comments from Simon about sed