Some validation fixes.