Fixed template path stack references