Fixed subtle bug, so that this component supports MDI applications.