Back-ported Kevin's fix to bvec decimal calc