fix closing menu and log messages