Fixes to ZRE and ZMTP