tweak to support programlisting in figures