fixed a potential NullReferenceException issue which is caused in racing condition situation