Fixes bug in index template