Fixed preferences bug