update template
add compatibility with OnApp 3.1
add compatibility with OnApp 3.1