Fix plugin to work in distributed master/slave environmnet