Fix braces, let go of bytebuffer on close.