fix use of heading flag in email plugin