bugfix: slow AQL for selecting neighbors