fixed bug in weighted evaluation