Fixed. (Just needed a pair of abs() calls.) Only took 7 years to notice that bug. ;)