Fix undefined index and array_fill_keys() expects parameter 1 to be array errors.
Fix for not being able to remove all plugins.