Fixed small traversal bug