Made some validation fixes.