bugfix: lowcase header not merged correctly

* typo
* debug log rearranged