Remove deprecation warning