bugfix in unweighted prediction