fixes issue #142 messy validation
another one
add braces
Merge pull request #145 from dethstar/master

fixes issue #142 messy validation