fix  deprecation warning