Fix NPE in restore REST call