correct ajax header handling