Added core dump.
Fixed null dereference.