Update deprecated code