fixing ma/heat figs  and pdf output