IDEX-1085: reworked preferences storage