Make sure templates with fade class are hidden before the transition is applied. Closes #2654
Merge branch 'master' into gh-pages