fixed loading from file