Some validation fixes