Fixes #20

Checking if gdefault is set and working accordingly