Added compatibility for protocol 18, keep backwards compatibility with 17, closes #11