Fix detection of data type.