Fix negative cycle duration