removing some deprecation warnings

What do you think?