corrected 404 handling