delete and insert segments on empty level

still need to fix strange epgdorsal error