Correct a bug (missing n = size(s,1))