Fix 404 and template picking.