infinite loop fix

Nailed it :) when setting an id selector with no elements in the DOM the
script will think it's a file and since it starts with # it's just a url
fragment so it will keep fetching the same page over and over again