Improve plugins handler