fixed horrible bug with template compilation error caused by changing of module loading order due to the requirejs upgrading.