FIX NPE in resource registry