Fix condition for displaying sidebar.