fix loading from file