Added support for OTP 16 and 17