some validation fixes