Fixed template resolve