Fix sidebar listeners. There should still be a memory leak, but I can fix it when the appropriate helpers are available.