Correctly adding and removing rows from sidebar.