fix bug for neiguagn query