Fixed deprecated code usage