Fixed bug when there aren't any links