Fixed more deprecations and warnings