prevent exceptions due to the session snapshot is reset
fixed an issue which could cause a NullReference exception