Fixed issues with error pages