menu items obtain active class correctly