fix a bug when deexcitation line is not contracted
change id-fn
a missing change in last commit
fix the failing tests