fixed "evil" optimisation case
adjust function names too after rename in traversal.js