now it should run perfectly even when no links found