What is package "pgf"? It seems to be causing the issue. AFAIK, this is not a standard package. Where did you get it from? Remove the package ("Package" > "Install/uninstall packages" > select it in the left list > click "Uninstall selection", then "Rebuild IDE".)