Add function to close all the buffers, not only the visible ones