bug#481, fixed nearest point on line