Fixed unit test crash in VS