set global variables to NULL before use

Issue: GCP-1029

Reviewer: Dennis