fixed the encoding/decoding of the reverse attribute for server side sort