fixed wrong condition in navbar template