fixed a few bugs with menu api