Optimize "getNodeByRange" method

Don't go down more it needs to