BugFix: Fixed NullReferenceException