Fixing #42 NameError: cmp issue