unit test crash fix