fix a bug in test program, some output changes