Fix code of tutorials now that mutable fields are deprecated