Update plugin.js

Fixed issue #2