Some deprecation warning fixes