fixed issue 871, comparator operation
Merge pull request #875 from deshapriya/fix-localcomparator-871

fixed issue 871, comparator operation