Added map/func to close all empty buffers