Sync master

Changed the distance calculation to stock