Fix links counting