Small fixes to the menu

Now it supports n elements.