fix vars generation in index template