update encrypted template
bug fixes