fix bug that prevented error messages from being returned if the PGcore object had not yet been defined (backported from gage_dev branch)
Changed paths: