Fixed bug in routes generator && minor fixes in geometric hashing