Why is the header element being removed?