fix navbar function