fixed scripts/styles/template execution order - fix #2