fix some bug in traversal.go