Case the headers correctly
Added some debug info