Fix NPE on location fail to load