bug fix pgf