fixed some conversion and schema problems in order to validate the templates better