Fixed url logic to be backwards compatible