Bugfix: normalize attribute weights with max(weights) instead of
sum(weights)