fix var error in index template