Fixed a bug

Hi, I fixed a bug in your plugin. It appeared when I tried out the script directly from your example code. 

Didn't edit the minified version, but I guess you have something/someone to do that for you :-)