fixed bug in energy and match term weighting
Merge branch 'convcheck'