Fixed a bug in persisting the last category choosen.