Adding compaction of mesh - buggy