Fixed problems with plugin