proper task indexing fix