Fixed 2 bugs with dereferencing NULL pointer