Fixed return codes for error pages