fixing menu logic