Fixed bug with script crush when there's a link with an anchor (#) to non-existing element