Fix crash after finish test.