HUGE problems with max-sum. behaves weird, does not change state...Trying to fix it