fix some issues on generate menu
