fix empty links and index