Bugfix for not working close dialog etc.