Change deprecated code