Fixed some minor bugs in GSN code