Fix bad plugins messing up preview and auto completer (related to #1221)