bugfix to queryLinks1