Fix next url generation.