fixed a bug: sorting field wasn't saved in the session