Fix the data format sent to server