fix element count