Tweak to how headers are set (fix failing tests)