Improve handling of preferences in Firefox