Prevent error when clicking outside the axes.