some bug fixes to Scaling.
Make sum only go over activevalues. closes #8