bugfix, include gid in goals embedded widget code