Bug fix: time out callback iteration.

The range may become invalid during the iteration.