Fix batBitSet

BitSet.count and BitSet.mem access a element after last one.