Fix plugin type selection in add form and clean up form.