fix template load sequence