NullReferenceException fixed