Fix a bug in distance queries