handle zero element size for bitarray