Change logic of checking the direct links

Should -1 @ jenkins