Fix checks on output for test cases