Fix 404 layout handling