fixup! Optimized writing to buffer, changed protocol