Fixed null cycle bug for the words changed metric