Fixed preferences array being set to session storage while testing