Class validation fixes