Repare and cleanup setting context data to nullptr on the object destruction.
Resolves #1050 (closed)