Fixed wrong calculation of InverseConsistency
Merge branch 'master' into xml