Some cleanup. Fixes sidebar bug.