Resolve deprecation warnings added in OTP 17