fixed TaskIndex error