Fix index and template