Fix bugs of converting headers