Fix tools::sequences and make its result serializable