fix return error from test code