Fixing autocomplete focus dropdown bug

Errors were being thrown when no elements were on a page.
 That's now fixed.