fix allows plugin to be triggered multiple times