Merge "Fix NPE in platform restore"