fix the deprecation warning