Preferences id cleanup

Cleaned up the preferences ids
See #3016