fix array casting in InCriterion and InModelCriterion. Fix #492
Merge pull request #512 from lunika/InCriterionFix

fix array casting in InCriterion and InModelCriterion. Fix #492