better error catch in gn constructor and minor improvements