Fix navbar defined? method