fixes in DistanceTrasnformFM