Fix NPE when loading locale