Removing deprecation warnings (fixes #360).

Hello, this patch fixes issue #360.