fixing bug with the sed regex