Fixes undefined is not a function error.
Adds misclick prevention.
Merge pull request #45 from tamasd/master

Adds misclick prevention.