bug fix inside traversing.js