Distance bugfix

Simple typo fixed