fixed trying to scroll to non-existant element when there was no query