Fixed bug in navbar rendering