Fixed assert for deleting empty buffers