Fix nunit tests caused by null session