fix sidebar iteration