fixed a few problems with header response