added error page redirection