Fix a couple of NPE's