fixed histogram scaling bug.