fix applying header, invert expected/actual to be correct