Properly remember previous selection.