fix parameter validation
Merge pull request #72 from jackalope/fix-validation

fix parameter validation