Better selected option detection.
Merge branch 'master' into gh-pages