Minor Fix

- Moved document click event out of plugin loop.