fixed redirecting issue