Fixed closing menus on all platforms