improved menu display handling on mobile device