fixed a bug with the plugin