Fixed an infinite loop when applying the preferences
Avoid a double const declaration
Improved handling of preferences for additional panels some more