Fix deprecation warnings

There were a few deprecation warnings on the latest nightly. I got rid of them.