Resolving deprecation warning.