output fix, testcase minor fix