Fix bug with custom validators