Fix test crash