Make sure we have the right element on click

Closes #186.