Fixing a null pointer error

Fix a bug that happened while I was trying to connect, and running another GCS at the same time.