Fix error when statusBar is undefined