Update buffer handling to v5 spec