Fix uninit value warning from undef values in header params
Add more tests for undef warnings