Validate data better (issue #2)