Add auto active menu logic