fixed a bug in the sed command