- fix some deprecated code