Please add a check for XML mode.