Fix active menu item not showing bug and clean code.