Fixed distance function return type #267