Fixed a bug where control's dispose causes error because .children property is set to null