Added menu button detection