Fix for NullReferenceException

I was running into a NullReferenceException during further testing.