Fix validation issue
Test update
Merge pull request #253 from anatoliychakkaev/master

Fixes and tests for validation