Fix failing tests (but they still terminate abnormally)