bug fixes in PG notebook