Fixup merge errors and null pointer warning