Fix registration null pointer reference