Changes added for redirecting page correctly