Updated Encode in server side.