I think the -1 means the last row is not linked (if this code is kept...)