Fix depration warnings