Attempted fix for NPE in file manager.