updating index
adding timeout when update fails instead of quick infinite loop