fix: proper (de-)serialisation for RMI messages