minor bugfix
some update, less memory use on saving .dat files