Fix for loop with reversed and limit.