Fix NPE on file load