handle bad data