Fixed a bug with sed