Changed preferences structure around to work