Make sure templates with fade class are hidden before the transition is applied. Closes #2654