fixed g bug in sed