Fix indexing error in timer processing