Fixed null pointer.
Fixed null pointer