Set active class correctly