Fixed 303 error and added general error page.