Fix chord algorithm, the paper is inaccurate...