Better validation Closes #3059.