RF-13739: revert changes
RF-13741: fix viewstate encoding