fix test-case bugs