handle unexpected data better