fix some errors from the sed script