fix redirect when running on another port