Corrects data structure