[3.8] Fix #1662 Checks if plugins exists before removing it