corrects overwriting issue