corrected bug in data weights