fixes search bugs and addplugin looping