Fixed serialisation issues