Fix bug in menu creation