Corrected computing of weights.

This fixes scenes 2-5 and breaks 6-7.