fix signed message encoding