Fix wrongly constructed redirect url