Fixed issue with templates not saving correctly.