fix header setting issue, fix proper JSON header setting