Fix broken 404 handling