Fix error reading file, fix error of period entries