Corrected some errors in the templates and in related fenix classes.