Fix scope variables not getting to template file in 3.7