Fixed a bug in the menu builder.