fix problem in url generation

reverse gives a tuple so it necessary to choose the first element to get the string