fix the navigation bar bug