added another condition statement in navbar