fix echo loop