Fixed "deprecated" warnings.