Add checking for data length during load.
Fix reindex always resulted in deletion.
Fix local count not updated after reindex.