Fixed bug with when click event was set
Merge branch 'master' into gh-pages