Merge pull request #2202 from ChaoPang/master

Fixed the integer comparison