bug fix for certain data sets