Fixing bug in clean collection that would remove empty arrays.