code cleanup
different check on the existence of gGeometry as it's not preloaded