Fixing comparison methods

Fixed completely stupid mistake in coding , and added/fixed tests to
check for it.