fix for repairing messages