buffer closing