Fixed problem with incorrect buffers clearing