Fix a menu handling bug