Fix template and index routing.