fixing a bug where the dataset events were being fired before the widget was rendered