Fix pre/postamble code