fixed deprecation warning.