fixed bug in index template