deprecation warning fixed