Finished repairing damage due to optimization