fix detect links