fixed #1036, added missed validations
Merge pull request #1078 from garciademarina/issue-1036

fixed #1036, added missed validations