Fix for the r == n case