Fixed the 'on_close' behaviour of toolbar items