Fixed the sidebar

Switching error no longer happens