Clean up sidebars on state change