fix elapsed time in update