Updated navbar logic