Fix redirect api