Fixed error causing extreme performance hit during loading of files.