Updated for new PGF surfaces.