Binary protocol fixes, signature encoding fixes