apply changes with the corrections from Avital