fix code generation and comment failing test due to comparsary fields made optional for first data collection