fix link detect