The solution.total() method fails when you get the total of Boron, so it returns the sum of all elements beginning by "B" (Br, Bi, Ba..).
The .total() method is probably using a simple substring search rather than an exact match of the element symbol.
It cauises big mistakes in speciation of elements.
Thanks!
Kike