Fixed bug where distance was being got not evaluated