fixed a redirecting issue