Fixed bugs concerning url generation