fix preferences switches logic

listeners for preferences are all synchronized
