Solved problem, removed code from template