refactor preferences reset for specs (reduced core test from 9 min to 5 min)