Some changes to avoid deprecation