Repairing a damaged manuscript