fix traversal check