various validation fixes