Updated usage of deprecated code