bug fixed: sometimes reindex was performed before index creation