Fix validation
Refactor