Fixed bug 2604.

Fixed sign error on y-coordinate of S in line 137.