fix query links