corrects db