fixed status check in indexing