bug fix in boolean for weighted