Fixed resting algorithm.