Fixed null pointer deref.