Change serialisation order and fixed base64 error