Fix that removes problem with disposing widgets.