Fixed serialization of duration