Fixed check flags validation
Add test for check flags