Improved handling of preferences