Fix some null pointer passing.