fix and improve error pages