Fixed collapse behavior

Collapse button should not be clicked each time a nav link is clicked,
only when it is visible.