Crash fix

null access crash fix