use internal polymorphic compare
Merge pull request #25 from mirleft/fix

use internal polymorphic compare