Some validation improvements.