Prevent errors by returning immediately if no elements matched.
Merge pull request #9 from tkirda/master

Prevent errors by returning immediately if no elements matched.