fixed an encoding issue in the client