fix collapse-with-empty-between-same bug