Fixed bug where overflow of last element was calculated incorrectly
Fixed bug where overflow of last element was calculated incorrectly

bh107/bohrium,bh107/bohrium,bh107/bohrium,bh107/bohrium,madsbk/bohrium,madsbk/bohrium,madsbk/bohrium,madsbk/bohrium