Fix fields count comparison