Better handling of 404 errors