alto: fix some bugs found by go tool in test cases