Fix bug for goals when there is no 'templates' TP in the project