Fix some deprecation warnings
Fix all warnings