resolve issue of redirecting to page