bn: fix handling overflows
0.2.13