fix minor bug for generate menu