Fix RR algorithm.