Fix for the allocation going negative. (bits[j] >= 0 assert)