Add 1.5.2 support and fix protocol bugs