[cleanup] Fixed deprecated code