fixed issue with multi values in templates not working correctly