fixed seg fault on empty template list