index template submit bug fix