correct error in order of opertions for bms bits calculation