Fixed template problems