Validate functions correctly should close #16