fix index bug in temporal