fixed handler for bad values in datastream