Fix automation engine to handle the data value based on its data type.