Small efficiency change in navbar collapse.