add test for custom 404 and fix error pages