Fixed NullReferenceException

It stopped giving me the error message when I did this.