fix backward comparison for weighted assignment