Fix and test deserialise + checking that input does not change