reverted last fix, implemented correct fix

segments should be taken from the translated route, not from the uri
fixed incorrect route resolving