Getting rid of deprecated warnings.