Removing deprecation warnings (fixes #360).