Finally fixed navbar generation