added error page redirecting