added leaf repair