fix case when there are no links