fixed data type handling bug in scatter