fixed null dereference
fixed uninitialized pointer