Use getByteSize instead of getMaxLength to fix broken unit tests