Fix security preamble and make it consistent in a few cases where it dev...

...iates

slightly.