[fix] fixed cleaning of the buffers