prevent multiple addition of classes and the toolbar