Adding lockbuffer