Fix prefs listener leak.
Get ids only once.